import { createApp } from 'vue'
import App from './App.vue'
import Antd from 'ant-design-vue'
import router from './router';
import 'ant-design-vue/dist/reset.css';
import SvgIcon from './components/SvgIcon/index.vue'


//刷新时检查 是否更新token
import { $setToken } from './utils/request'
let token  = sessionStorage.getItem('token')
if(token){
    $setToken(token)
}


const req = require.context('./icons/svg', false, /\.svg$/) 
const requireAll = requireContext => requireContext.keys().map(requireContext);
requireAll(req);

let vm= createApp(App)
vm.component('SvgIcon',SvgIcon)
vm.use(Antd).use(router).mount('#app')


